 import {Flex} from 'antd-mobile'
 import Proptypes from 'prop-types'
 import styles from './index.module.css'
 const FilterFooter =({
     cancelText='取消',
     okText='确定',
     onCancel,
     onOk,
     className,
 })=>{
    return(
        <Flex className={[styles.root,className ||''].join(' ')}>
            {/* 取消按钮 */}
            <span className={[styles.btn,styles.cancel].join(' ')}
            onClick={onCancel}
            >{cancelText}</span>

            {/* 确定按钮 */}
            <span className={[styles.btn,styles.ok].join(' ')}
            onClick={onOk}
            >{okText}</span>
        </Flex>
    )
 }

//  props校验
FilterFooter.propTypes={
    cancelText:Proptypes.string,
    okText:Proptypes.string,
    onCancel:Proptypes.func,
    onOk:Proptypes.func,
    className:Proptypes.string
}
 export default FilterFooter